Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

fix: fix convertamount format #1191

Merged
merged 4 commits into from
Jul 13, 2021
Merged

fix: fix convertamount format #1191

merged 4 commits into from
Jul 13, 2021

Conversation

asbiin
Copy link
Contributor

@asbiin asbiin commented Jul 13, 2021

Amount must ALWAYS be saved as integer.
In this case, converted_amount is also render later using MoneyHelper::format() which take the amount as an integer.

Notes:

  • the migration in 2021_07_13_164157_fix_expense_converted_amount.php use a change() which does not work on sqlite (it locks the table!)
  • that's why I've updated the columns in 2020_06_30_211833_create_expenses_table.php also: it will apply for sqlite, or new installation, which is fine, and the migration will not apply to existing installation, which is fine too (the 2nd migration will fix it)

Thanks for contributing.

Please make sure your PR follows those guidelines:

  • Unit tests for everything.
  • Documentation has been written on the documentation website.
  • Dummy data in the SetupDummyAccount file, so test accounts are populated automatically with fresh data.

@asbiin asbiin marked this pull request as draft July 13, 2021 17:10
@asbiin asbiin marked this pull request as ready for review July 13, 2021 17:24
@asbiin asbiin requested a review from djaiss July 13, 2021 17:25
Copy link
Member

@djaiss djaiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@asbiin asbiin merged commit 841cd29 into main Jul 13, 2021
@asbiin asbiin deleted the 20210713-fixconverted branch July 13, 2021 20:36
@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants